

    <div class="container">
      <div class="row">
          
        <div class="col-md-8">
            
            <?php if(isset($dataNew[0]['q_content'])):?>
                <?php
                        $form = $this->beginWidget(
                                'CActiveForm', array(
                            'id' => 'vote-form',
                            // 'enableAjaxValidation'=>true,   
                            'enableClientValidation' => true,
                            'clientOptions' => array(
                                'validateOnSubmit' => true,
                            ),
                            'htmlOptions' => array('enctype' => 'multipart/form-data', 'class' => 'form-horizontal'),
                                // 'action'=>array('/admin'),
                        ));
              ?>
           
    
          <div class="com-detail-main">
            <div class="com-detail-title">
              <h3><?php echo $dataNew[0]['title']; ?></h3>
              <p><?php echo date('Y/m/d',$dataNew[0]['ctime']).' '.$dataNew[0]['rename']; ?></p>
            </div>
            <div class="com-detail-text">
                
              <ol>     
                <?php foreach($dataNew as $k=>$v): ?> 
                  
                <li>
                  <p><?php echo $v['q_content']?></p>
                   <ul class="list-unstyled" data-toggle="buttons">
                      
                    <?php foreach($v['a_info'] as $kk=>$vv): ?>              
                       <li><label href="javascript:;" class="btn com-detail-check"><span class="glyphicon glyphicon-ok"></span><input type="radio" value="<?php echo $kk;?>"  name="ActivityVote[<?php echo $v['q_id'];?>]" id="option<?php echo $kk?>" autocomplete="off"><?php echo $vv;?></label></li>
                    
                     <?php endforeach;?>
                  </ul>
                </li>
                <?php endforeach;?>
              </ol>
              <div class="text-center"><button type="button"   id="vote_sumbit" class="btn btn-primary btn-lg" style="width:360px;">提交</button></div>
            </div>
            <div class="com-detail-app text-center">
              <div class="com-detail-app-news"><img src="/images/activityrwm.png" class="com-detail-qrcode-news"></div>
            </div>
            <div class="bdsharebuttonbox com-bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
          </div>
        
            <?php $this->endWidget(); ?>	
            
            
            
            
            
            
            <?php else: ?>
          <div class="com-detail-main">
            <div class="com-detail-title">
              <div class="com-activity-count pull-right">
                <div style="background:#3399CC;"><?php echo $dataNew[0]['fav_count']; ?>人收藏</div>
                <div style="background:#FF3838;"><?php echo $dataNew[0]['signup_count']; ?>人报名</div>
              </div>
              <h3><?php echo $dataNew[0]['title']; ?></h3>
              <p>2014/09/30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类型：<?php echo $dataNew[0]['name']; ?></p>
            </div>
            <div class="com-detail-activity-info">
              <dl class="dl-horizontal">
                <dt>举&nbsp;&nbsp;办&nbsp;&nbsp;方：</dt>
                <dd><?php echo $dataNew[0]['rename']; ?></dd>
                <dt>活动时间：</dt>
                <dd><?php echo date('Y-m-d H:i',$dataNew[0]['start_time']);?> - <?php echo date('Y-m-d H:i',$dataNew[0]['end_time']);?></dd>
                <dt>活动地址：</dt>
                <dd><?php echo $dataNew[0]['address'];?></dd>
                <dt>联&nbsp;&nbsp;系&nbsp;&nbsp;人：</dt>
                <dd><?php echo $dataNew[0]['contacts'];?>  <?php echo $dataNew[0]['tel'];?></dd>
              </dl>
            </div>
            <h5 class="com-detail-activity-nav">简介</h5>
            <div class="com-detail-text">
                    <?php echo $dataNew[0]['content'];?>
            </div>
            <h5 class="com-detail-activity-nav" style="margin-top:50px;">活动二维码</h5>
            <div class="com-detail-app text-center" style="margin-top:10px;">
              <div class="com-detail-app-activity"><img src="/images/activityrwm.png" class="com-detail-qrcode-activity"></div>
            </div>
            <div class="bdsharebuttonbox com-bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
          </div>
            <?php endif;?>
            
        </div>     
    <!-- Login Start -->
        <div class="col-md-4" style="padding:0;">
          <div class="com-user">
            <h3 class="text-center">校友登录</h3>
            <form class="com-login" role="form">
              <div class="com-login-cell form-group has-feedback col-md-8 col-md-offset-2">
                <label class="sr-only" for="user_phone">手机号码</label>
                <input type="text" class="form-control" id="user_phone" placeholder="手机号码">
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
              </div>
              <div class="com-login-check form-group has-feedback col-md-5 col-md-offset-2">
                <label class="sr-only" for="user_check">验证码</label>
                <input class="form-control" type="text" id="user_check" placeholder="验证码">
                <span class="glyphicon glyphicon-random form-control-feedback"></span>
              </div>
              <button type="submit" class="com-login-get btn btn-default col-md-3">获取验证码</button>
              <button type="submit" class="com-login-btn btn-lg btn btn-default col-md-8 col-md-offset-2">登录/注册</button>
            </form>
            <div class="com-download">
              <img src="/images/download_bg.png">
              <a href="javascript:;" class="com-ios"></a>
              <a href="javascript:;" class="com-andriod"></a>
            </div>
          </div>

          <div class="com-contain-nav">
            <ul class="com-others-navtabs nav">
              <li class="com-others-toptenz">活动排行榜</li>
            </ul>
          </div>
          <div> 
            <div class="com-others">
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow">
                  <div class="com-text-con"><span class="com-others-num">1</span> 这是一段比较长的文字这是一段比较长的文字这是一段比较长的文字这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
              
              
              
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow" >
                  <div class="com-text-con"><span class="com-others-num">2</span> 这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow" >
                  <div class="com-text-con"><span class="com-others-num">3</span> 这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow" >
                  <div class="com-text-con"><span class="com-others-num">4</span> 这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow" >
                  <div class="com-text-con"><span class="com-others-num">5</span> 这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
              <a href="javascript:;" class="com-others-link">
                <div class="com-text-overflow" >
                  <div class="com-text-con"><span class="com-others-num">6</span> 这是一段比较长的文字</div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
            </div>
          </div>
          <div class="com-others-banner">
            <a href=""><img src="/images/small_img.jpg"></a>
          </div>
    <!-- Login End -->
        </div>
      </div>
    </div>
    





	     <?php Yii::app()->clientScript->registerCoreScript('jquery');//引入Yii内置jQeury核心文件?>
        


<script type="text/javascript">
    
    $('#vote_sumbit').click(function(event){
        
        var tmplabel = $('.list-unstyled').find('label').attr('class');
        var count = $('.list-unstyled').size();
        var activecount =0;
        console.log(count);
        
        $('.list-unstyled').each(function(v,item){
           // console.log(item);
            $(this).find('label').each(function(kk,vv){
                if(vv.className == 'btn com-detail-check active'){
                     activecount++;
                }
            });
        });
        if(activecount == count){
            $('#vote-form').sumbit();
        }else{
            alert('题目未选完!');
            return false;
        }   
        
      });
        
       
    
</script>
